Optimal. Leaf size=35 \[ \frac {B x}{a}-\frac {(A-B) \cos (e+f x)}{f (a+a \sin (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {2814, 2727}
\begin {gather*} \frac {B x}{a}-\frac {(A-B) \cos (e+f x)}{f (a \sin (e+f x)+a)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2727
Rule 2814
Rubi steps
\begin {align*} \int \frac {A+B \sin (e+f x)}{a+a \sin (e+f x)} \, dx &=\frac {B x}{a}-(-A+B) \int \frac {1}{a+a \sin (e+f x)} \, dx\\ &=\frac {B x}{a}-\frac {(A-B) \cos (e+f x)}{f (a+a \sin (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(79\) vs. \(2(35)=70\).
time = 0.12, size = 79, normalized size = 2.26 \begin {gather*} \frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (B (e+f x) \cos \left (\frac {1}{2} (e+f x)\right )+(2 A+B (-2+e+f x)) \sin \left (\frac {1}{2} (e+f x)\right )\right )}{a f (1+\sin (e+f x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.12, size = 42, normalized size = 1.20
method | result | size |
derivativedivides | \(\frac {2 B \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )-\frac {2 \left (A -B \right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}}{a f}\) | \(42\) |
default | \(\frac {2 B \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )-\frac {2 \left (A -B \right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}}{a f}\) | \(42\) |
risch | \(\frac {B x}{a}-\frac {2 A}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}+\frac {2 B}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}\) | \(54\) |
norman | \(\frac {\frac {B x}{a}+\frac {B x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a}+\frac {B x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}+\frac {B x \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}+\frac {\left (2 A -2 B \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a f}+\frac {\left (2 A -2 B \right ) \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right ) \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}\) | \(134\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 84 vs.
\(2 (37) = 74\).
time = 0.51, size = 84, normalized size = 2.40 \begin {gather*} \frac {2 \, {\left (B {\left (\frac {\arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a} + \frac {1}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )} - \frac {A}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 70, normalized size = 2.00 \begin {gather*} \frac {B f x + {\left (B f x - A + B\right )} \cos \left (f x + e\right ) + {\left (B f x + A - B\right )} \sin \left (f x + e\right ) - A + B}{a f \cos \left (f x + e\right ) + a f \sin \left (f x + e\right ) + a f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 109 vs.
\(2 (26) = 52\).
time = 0.62, size = 109, normalized size = 3.11 \begin {gather*} \begin {cases} - \frac {2 A}{a f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + a f} + \frac {B f x \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )}}{a f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + a f} + \frac {B f x}{a f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + a f} + \frac {2 B}{a f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + a f} & \text {for}\: f \neq 0 \\\frac {x \left (A + B \sin {\left (e \right )}\right )}{a \sin {\left (e \right )} + a} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 40, normalized size = 1.14 \begin {gather*} \frac {\frac {{\left (f x + e\right )} B}{a} - \frac {2 \, {\left (A - B\right )}}{a {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 12.92, size = 35, normalized size = 1.00 \begin {gather*} \frac {B\,x}{a}-\frac {2\,A-2\,B}{a\,f\,\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________